let _util = require('util/util.js');

let service = {
    loadTableInfo: function (params) {
        return new Promise((resolve, reject) => {
            _util.request({
                url: 'http://localhost:3000/certificatePhotos/',
                // url: 'http://111.231.233.160:8080/catalogue/getDelCatalogue',
                data: params.data,
                success: function (res) {
                    let newObj = $.extend({}, { data: res }, params);
                    resolve(newObj);
                },
                error: function (err) {
                    console.log(err);
                }
            })
        })
    },
    //加载图片的基本表格信息
    loadCertificatePhotosTable: function (params) {
        return new Promise((resolve, reject) => {
            _util.request({
                url: 'http://localhost:3000/certificatePhotos/',
                data: params.data,
                success: function (res) {
                    resolve(res);
                },
                error: function (errMsg) {
                    console.log(errMsg);
                }
            })
        });
    }
}

module.exports = service;